<?php
/**
 * @description:
 * @author     : Geomen
 * @time       : 2019/1/28 16:49
 */


namespace App\Models;


use Illuminate\Database\Eloquent\Model;

class Menu extends Model
{
    protected $table = 'menu';

    protected $hidden = ['created_at','updated_at','sort'];

    public function sub(){
        return $this->hasMany(Menu::class,'parent_id')->where('parent_id','>',0);
    }
}